<?php

$id = $_POST['id_value'];
$options = ['gs' => ['Content-Type' => 'text/plain']];
$ctx = stream_context_create($options);
if (false == rename($_FILES['uploaded_files']['tmp_name'], 'gs://national-test.appspot.com/' . $id, $ctx)) {
    die('Could not rename.');
}

function redirect($url, $statusCode = 303)
{
   header('Location: ' . $url, true, $statusCode);
   die();
}
Redirect('/car/'.$id, false);
?>
